import type {RouteRecordRaw} from 'vue-router';

import {BasicLayout} from '#/layouts';

const routes: { path: string; component: () => Promise<{}>; children: ({ path: string; component: () => Promise<{}>; meta: { icon: string; title: string }; name: string } | { path: string; component: () => Promise<{}>; meta: { icon: string; title: string }; name: string })[]; meta: { keepAlive: boolean; icon: string; title: string; order: number }; name: string }[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'ic:baseline-view-in-ar',
      keepAlive: true,
      order: 7,
      title: '系统管理',
    },
    name: 'System',
    path: '/system',
    children: [
      {
        name: 'accountList',
        path: '/system/account',
        component: () => import('#/views/system/account/list/accountList.vue'),
        meta: {
          icon: 'mdi:page-previous-outline',
          title: '账号管理'
        },
      },
      {
        name: 'roleList',
        path: '/system/role',
        component: () => import('#/views/system/role/list/roleList.vue'),
        meta: {
          icon: 'mdi:page-previous-outline',
          title: '角色管理'
        },
      },
      {
        name: 'menuList',
        path: '/system/menu',
        component: () => import('#/views/system/menu/list/menuList.vue'),
        meta: {
          icon: 'mdi:page-previous-outline',
          title: '菜单管理'
        },
      },
      {
        name: 'auditList',
        path: '/system/audit',
        component: () => import('#/views/system/audit/list/auditList.vue'),
        meta: {
          icon: 'mdi:page-previous-outline',
          title: '审计管理'
        },
      },
      {
        name: 'configList',
        path: '/system/list',
        component: () => import('#/views/system/config/list/configList.vue'),
        meta: {
          icon: 'mdi:page-previous-outline',
          title: '系统配置'
        },
      },
    ],
  },
];

export default routes;
